/**
 * 
 */
package com.taobao.wolfwolf.taobao;
import com.taobao.api.ApiException;
import com.taobao.api.Constants;
import com.taobao.api.DefaultTaobaoClient;
import com.taobao.api.TaobaoClient;
import com.taobao.api.request.ItemsGetRequest;
import com.taobao.api.response.ItemsGetResponse;

/**
 * @author Tux
 * 
 *         创建时间: 2011-7-6 下午11:46:18
 */
public class GetProducts {

	/**
	 * @param args
	 */
	public static void main(String[] args) {

		try {

			TaobaoClient client = new DefaultTaobaoClient(TaoBaoUtil.TAOBAO_F_URL,
					TaoBaoUtil.APP_KEY, TaoBaoUtil.APP_SERCET, Constants.FORMAT_XML);
			ItemsGetRequest req = new ItemsGetRequest();
			req.setFields("num_iid,title,detail_url,pic_url,num,price,");
			req.setNicks("myleft1");
			req.setPageNo(2L);
			req.setPageSize(20L);
			ItemsGetResponse response = client.execute(req,
					"TOP-10f9f3461ded3b3d6d4e66ee4487eafd83dZM29C63jdbwkPsdesYA9nH8yXLpH0-END");

			System.out.println(response.getBody());
		} catch (ApiException e) {
			// TODO 未完成的异常捕捉
			e.printStackTrace();
		}

	}

}
